package com.jwtItem.service.serviceImpl;

//import com.jwtItem.dao.UserDaoMapper;
import com.jwtItem.entity.User;
import com.jwtItem.mapper.UserDaoMapper;
import com.jwtItem.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDaoMapper userDaoMapper;
    
    /**
     *登录验证
     */
    @Override
    public  User login(User user){
        User userDb= userDaoMapper.login(user);
        if(userDb!=null){
            return  userDb;
        }
        throw  new RuntimeException("认证失败");
    }
}
